#include <pthread.h>
#include <stdio.h>
void *t1_exe(void *arg)
{
    for (int i = 1; i < 6; i++)
        printf("%d\n", i);
}
void *t2_exe(void *arg)
{
    pthread_join((pthread_t)arg, NULL);
    for (int i = 6; i < 11; i++)
        printf("%d\n", i);
}
void main()
{
    pthread_t pid1, pid2;
    pthread_create(&pid1, NULL, t1_exe, NULL);
    pthread_create(&pid2, NULL, t2_exe, (void *)pid1);
    pthread_join(pid2, NULL);
}